﻿@using EUTmvc.Models
@{
    var a = AccountModel.AccountInfo((string)Session["Account"]);
}

@if (a == null)
{
    <a data-toggle="dropdown" class="dropdown-toggle" href="#">Tài Khoản <span class="caret"></span></a>
    <ul role="menu" class="dropdown-menu">
        <li><a href="/Account/Login">Đăng Nhập</a></li>
        <li><a href="/Account/ForgotPassword">Quên Mật Khẩu</a></li>
        <li class="divider"></li>
        <li><a href="/Account/Register">Đăng Ký</a></li>
    </ul>
}
else
{
    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
        <img alt="" src="@a.Image" class="account-icon"/>
        @Html.Raw(a.Account)
        <span class="caret"></span>
    </a>
    <ul class="dropdown-menu dropdown-user">
        <li><a href="/Account/AccountInfo/"><i class="glyphicon glyphicon-user glyphicon-icon"></i>Thông tin tài khoản</a>
        </li>
        <li><a href="/Account/ChangePassword/"><i class="glyphicon glyphicon-cog glyphicon-icon"></i>Đổi mật khẩu</a>
        </li>
        <li class="divider"></li>
        <li><a href="/Account/Logout/"><i class="glyphicon glyphicon-log-out glyphicon-icon"></i>Đăng xuất</a>
        </li>
    </ul>

    <!-- /.dropdown-user -->
}